import 'package:flutter/material.dart';

class CurrentIndexProvider extends ChangeNotifier {
  int oldIndex = 0;
  int currentIndex = 0;

  bool newInThisPage(int index) {
    return currentIndex == index && oldIndex != index;
  }

  changeIndex(int newIndex) {
    oldIndex = currentIndex;
    currentIndex = newIndex;
    notifyListeners();
  }
}
